<?php

namespace Entity;

class Menu extends \Home {

    public $menu = array();

    public function __construct() {
        $categories = \Data\Category::instance()->getRootCategories();
        foreach ($categories as $val) {
            $menu[$val['CategoryId']] = array(
                'Name' => $val['CategoryName'],
                'CategoryId' => $val['CategoryId'],
                'Type' => $val['Type'],
                'Icon' => $val['Icon'],
            );
        }
        $this->menu = $menu;
    }
}